<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

// 物流
class Logistics extends Model
{
    protected $fillable = [
        'name',
        'number',
        'contact_phone',
        'logo',
        'order',
        'status',
        'is_default'
    ];

    protected $casts = [
        'status' => 'boolean',
        'is_default' => 'boolean'
    ];

    // 关联运费模板
    public function templates()
    {
        return $this->hasMany(LogisticsTemplate::class);
    }
}
